import request from '@/utils/request'

// 创建设备采集信息
export function createAcquisitionInfo (data) {
  return request({
    url: '/equipment/acquisition-info/create',
    method: 'post',
    data: data
  })
}

// 更新设备采集信息
export function updateAcquisitionInfo (data) {
  return request({
    url: '/equipment/acquisition-info/update',
    method: 'put',
    data: data
  })
}

// 删除设备采集信息
export function deleteAcquisitionInfo (id) {
  return request({
    url: '/equipment/acquisition-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得设备采集信息
export function getAcquisitionInfo (id) {
  return request({
    url: '/equipment/acquisition-info/get?id=' + id,
    method: 'get'
  })
}

// 获得设备采集信息分页
export function getAcquisitionInfoPage (query) {
  return request({
    url: '/equipment/acquisition-info/page',
    method: 'get',
    params: query
  })
}

// 导出设备采集信息 Excel
export function exportAcquisitionInfoExcel (query) {
  return request({
    url: '/equipment/acquisition-info/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

//获得设备采集信息列表根据stationId并且根据采集时间分组
export function getAcquisitionInfoTime (query) {
  return request({
    url: '/equipment/acquisition-info/get-group-monitor-time',
    method: 'get',
    params: query
  })
}

